import Vue from 'vue'
import Vuex from 'vuex'
import App from './App.vue'
import axios from 'axios';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);
Vue.use(Vuex);

//导入路由模块
import router from "@/router"
// 导入样式
import './assets/css/bootstrap.css'
import './index.css'
// 挂载到vue原型链上
Vue.prototype.axios = axios;
Vue.config.productionTip = false
// 在Vue原型链上绑定一个$bus的事件总线

const store = new Vuex.Store({
  state: {
    count: 0,
    user: {
      id: '',
      password: '',
      life: null,
      score: null,
      loginName: null
    },
  },
  mutations: {
    increment(state) {
      state.count++
    }
  }
})

export default store;

new Vue({
  router,
  axios,
  render: h => h(App),
  store: store,
}).$mount('#app')